<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
test(function(t) {

    var canvas = document.createElement('canvas');
    var context = canvas.getContext("2d");
    for (x = 0; x < 100; x++) {
        context.restore();
        context.save();
        context.save();
        context.measureText("a", 0, 0, 0);
    }
}, 'Regression test for bug http://webkit.org/b/106244. Test passes by not crashing.');
</script>
